package com.itheima.controller.backend.controller;

import com.itheima.common.dto.LoginDto;
import com.itheima.common.entity.Result;
import com.itheima.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/member")
public class MemberController {

    @Autowired
    private MemberService memberService;

    @PostMapping("/login")
    public Result login(@RequestBody LoginDto loginDto){
        memberService.login(loginDto);
        return new Result(true,"登录成功",22);
    }

}
